<template>
	<view >
        
		<view class="box" >
			<view class="text" >姓名</view>
			<view class="div"  >
                <input placeholder="请输入姓名" v-model="name"/>
            </view>
		</view>
        <view class="box" >
			<view class="text" >手机号</view>
			<view class="div"  >
                <input placeholder="请输入手机号" v-model="phone"/>
            </view>
		</view>
        <view class="box" >
			<view class="text" >个人介绍</view>
			<view class="div"  >
                <input placeholder="请输入个人介绍" v-model="industry"/>
            </view>
		</view>

		<view class="btn" @click="issue">提交审核</view>
		<view style="height: 150rpx;"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userInfo:{},
				is_fb:false,
				name:'',
				phone:'',
				industry:'',
			}
		},
		onLoad() {
			this.userInfo = uni.getStorageSync('userInfo');
		},
		methods: {
			genderConfirm:function(e){
				this.task_status_name = e[0].label;
				this.task_status = e[0].value;
			},
			regionConfirm:function(e){
				this.address = e.province.label+'-'+e.city.label;
			},
			issue(){
				if(this.name == ''){
					return this.$Toast('请输入姓名!')
				}
				if(this.phone == ''){
					return this.$Toast('请输入手机号!')
				}
				if(this.is_fb){
					this.$Toast('请勿重复点击提交');
					return false;
				}
				this.is_fb = true;
				var that = this;
				uni.request({
					url: 'https://oa.yuxiang123.cn/api/shop/add_agent',
					header:{
						"content-type": "application/x-www-form-urlencoded"
					},
					data:{
						token:uni.getStorageSync('token'),
						name:this.name,
						phone:this.phone,
						industry:this.industry,
					},
					method: 'POST',
					success: (res) => {
						that.$hide()
						setTimeout(function () {
							that.is_fb = false;
						}, 1000);
						this.$Toast(res.data.msg)
						if(res.data.code == 1){
							setTimeout(function () {
								uni.navigateTo({
                                    url:'/subone/user/invite'
                                })
							}, 800);
						}
					}
				})
					
			},
		}
	}
</script>

<style lang="scss" scoped>
.bom{
	margin: 20upx;
	background-color: #FFFFFF;
	border-radius: 10upx;
	.bom_title{
		
	}
	.bom_img{
		display: flex;
		flex-wrap: wrap;
		.item{
			text-align: center;
			width: 30%;
			background-color: #f0f0f0;
			height: 200upx;
			border-radius: 10upx;
			margin-top: 20upx;
			color: #999999;
			margin-right: 20upx;
			position: relative;
			.icon{
				position: absolute;
				right: -10upx;
				top: -20upx;
				font-size: 40upx;
				background-color: #FFFFFF;
				border-radius: 50%;
				color: rgba($color: #333, $alpha: 0.5);
			}
			.item_icon{
				margin-top: 40upx;
				font-size: 40upx;
			}
			.item_text{
				color: #999999;
				font-size: 26upx;
				margin-top: 10upx;
			}
			image{
				width: 100%;
				height: 100%;
				border-radius: 10upx;
			}
			.seturl{
				position: absolute;
				bottom: 0;
				width: 100%;
				background-color: rgba($color: #333, $alpha: 0.5);
				border-radius: 0 0 10upx 10upx;
				color: #FFFFFF;
				font-size: 24upx;
				padding: 10upx 0;
			}
			.selectSet{
				background-color: rgba($color: red, $alpha: 0.5);
			}
		}
	}
}
.btn{
	background-color: #31D1C9;
	color: #fff;
	width: 90%;
	margin: auto;
	margin-top: 50upx;
	text-align: center;
	padding: 20upx 0;
	font-size: 28upx;
	border-radius: 50upx;
}
.box{
	display: flex;
	align-items: center;
	padding: 30upx 20upx;
	border-bottom: 1px solid #f5f5f5;
	.text{
		
	}
	.div{
		flex: 1;
		text-align: right;
		margin-right: 20upx;
		color:#999;
	}
}
</style>
